/** * Autogenerated by Avro * * DO NOT EDIT DIRECTLY */ package com.esri; @SuppressWarnings("all") @org.apache.avro.specific.AvroGenerated public class AvroSpatialReference extends org.apache.avro.specific.SpecificRecordBase implements org.apache.avro.specific.SpecificRecord { public static final org.apache.avro.Schema SCHEMA$ = new org.apache.avro.Schema.Parser().parse("{\"type\":\"record\",\"name\":\"AvroSpatialReference\",\"namespace\":\"com.esri\",\"fields\":[{\"name\":\"wkid\",\"type\":\"int\",\"default\":4326}]}"); public static org.apache.avro.Schema getClassSchema() { return SCHEMA$; } @Deprecated public int wkid; /** * Default constructor. */ public AvroSpatialReference() {} /** * All-args constructor. */ public AvroSpatialReference(java.lang.Integer wkid) { this.wkid = wkid; } public org.apache.avro.Schema getSchema() { return SCHEMA$; } // Used by DatumWriter. Applications should not call. public java.lang.Object get(int field$) { switch (field$) { case 0: return wkid; default: throw new org.apache.avro.AvroRuntimeException("Bad index"); } } // Used by DatumReader. Applications should not call. @SuppressWarnings(value="unchecked") public void put(int field$, java.lang.Object value$) { switch (field$) { case 0: wkid = (java.lang.Integer)value$; break; default: throw new org.apache.avro.AvroRuntimeException("Bad index"); } } /** * Gets the value of the 'wkid' field. */ public java.lang.Integer getWkid() { return wkid; } /** * Sets the value of the 'wkid' field. * @param value the value to set. */ public void setWkid(java.lang.Integer value) { this.wkid = value; } /** Creates a new AvroSpatialReference RecordBuilder */ public static com.esri.AvroSpatialReference.Builder newBuilder() { return new com.esri.AvroSpatialReference.Builder(); } /** Creates a new AvroSpatialReference RecordBuilder by copying an existing Builder */ public static com.esri.AvroSpatialReference.Builder newBuilder(com.esri.AvroSpatialReference.Builder other) { return new com.esri.AvroSpatialReference.Builder(other); } /** Creates a new AvroSpatialReference RecordBuilder by copying an existing AvroSpatialReference instance */ public static com.esri.AvroSpatialReference.Builder newBuilder(com.esri.AvroSpatialReference other) { return new com.esri.AvroSpatialReference.Builder(other); } /** * RecordBuilder for AvroSpatialReference instances. */ public static class Builder extends org.apache.avro.specific.SpecificRecordBuilderBase<AvroSpatialReference> implements org.apache.avro.data.RecordBuilder<AvroSpatialReference> { private int wkid; /** Creates a new Builder */ private Builder() { super(com.esri.AvroSpatialReference.SCHEMA$); } /** Creates a Builder by copying an existing Builder */ private Builder(com.esri.AvroSpatialReference.Builder other) { super(other); } /** Creates a Builder by copying an existing AvroSpatialReference instance */ private Builder(com.esri.AvroSpatialReference other) { super(com.esri.AvroSpatialReference.SCHEMA$); if (isValidValue(fields()[0], other.wkid)) { this.wkid = data().deepCopy(fields()[0].schema(), other.wkid); fieldSetFlags()[0] = true; } } /** Gets the value of the 'wkid' field */ public java.lang.Integer getWkid() { return wkid; } /** Sets the value of the 'wkid' field */ public com.esri.AvroSpatialReference.Builder setWkid(int value) { validate(fields()[0], value); this.wkid = value; fieldSetFlags()[0] = true; return this; } /** Checks whether the 'wkid' field has been set */ public boolean hasWkid() { return fieldSetFlags()[0]; } /** Clears the value of the 'wkid' field */ public com.esri.AvroSpatialReference.Builder clearWkid() { fieldSetFlags()[0] = false; return this; } @Override public AvroSpatialReference build() { try { AvroSpatialReference record = new AvroSpatialReference(); record.wkid = fieldSetFlags()[0] ? this.wkid : (java.lang.Integer) defaultValue(fields()[0]); return record; } catch (Exception e) { throw new org.apache.avro.AvroRuntimeException(e); } } } }